\section{fix --- Round towards zero}
\label{fn:fix}
\index{fix()}
\index{round towards zero}
\begin{rail}
Fix : 'fix' '(' ( Scalar | Matrix ) ')' ;
\end{rail}

\verb+fix+ rounds the argument towards zero. If the argument is a 
matrix, this is performed element-by-element.

$\Longrightarrow$ This is not an \RLaB\ built-in function.  This function
is normally loaded on start-up from the \verb+fix.r+ file in the
standard \verb+rlib+ directory. Use of the \verb+-r+ option, incorrectly 
setting the \verb+RLAB_LIB_DIR+ environmental variable, or modifying
\verb+fix.r+ may make this function unavailable.

\paragraph{Example}
\index{example of fix()}
\index{fix()!example}
\begin{verbatim}
> fix(2.53)
        2  
> fix(-3.0999)
       -3  
> fix(3.9999)
        3  
> fix(1.234+4.32j)
        1 + 4i
> fix(1.999+4.999j)
        1 + 4i
> a = rand(2,3)+rand(2,3)*1j;
> b = 10*a
 b =
 matrix columns 1 thru 3
            2.04 + 2.99i               6.55 + 7i            9.1 + 0.918i
            1.67 + 2.65i             1.29 + 9.5i            1.12 + 9.02i

> fix(b)
 matrix columns 1 thru 3
                  2 + 2i                  6 + 6i                  9 + 0i
                  1 + 2i                  1 + 9i                  1 + 9i
\end{verbatim}

See also: Page~\pageref{fn:ceil} \verb+ceil()+,
Page~\pageref{fn:floor} \verb+floor()+,
Page~\pageref{fn:round} \verb+round()+.


\newpage



